package com.guigu.tms.dispatch.service;

import com.guigu.tms.commons.dispatch.entity.ScheduleJob;

public interface IScheduleJobService {
    /**
     * 添加定时任务
     * @param schedulerJob
     * @return
     */
    boolean add(ScheduleJob schedulerJob);

    /**
     * 更新定时任务
     * @param scheduleJob
     * @return
     */
    boolean update(ScheduleJob scheduleJob);

    /**
     * 暂停或恢复定时任务
     * @param jobId
     * @param status
     * @return
     */
    boolean updateStatus(String jobId,Integer status);

    /**
     * 根据任务id获取定时任务
     * @param jobId
     * @return
     */
    ScheduleJob getScheduleJob(String jobId);

}
